from django.shortcuts import render,HttpResponse

# Create your views here.
def student(request):
    if request.method == "GET":
        return render(request,'add.html')
    if request.method == "POST":
        stu_name = request.POST.get("stu_name")
        class1 = request.POST.get("class1")
        sex = request.POST.get("sex")
        img_path = request.FILES.get("img_path")
        specialized  = request.FILES.get("specialized ")
        return HttpResponse("头像:{},姓名:{},年级:{},性别:{},专业：{}".format(img_path,stu_name,class1,sex,specialized))



def stuList(request):
    course = Course.object.all()
    print(len(course))
    g = Group(course,3)


















